Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix show_deleted when buffer not in cache #777

Merged
merged 1 commit into from
Mar 30, 2023

Conversation

garcia5
Copy link

@garcia5 garcia5 commented Mar 30, 2023

I would get an error when running gs.toggle_deleted(true) from a hydra.nvim setup function.

Error message:

Error executing vim.schedule lua callback: ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:105: The coroutine failed with this message: ...l/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/manager.lua:274: bad argument #1 to 'ipai
rs' (table expected, got nil)                                                                                                                                                                                                                
stack traceback:                                                                                                                                                                                                                             
        [C]: in function 'ipairs'                                                                                                                                                                                                            
        ...l/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/manager.lua:274: in function 'update_show_deleted'                                                                                                                                   
        ...l/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/manager.lua:324: in function 'fn'                                                                                                                                                    
        .../share/nvim/lazy/gitsigns.nvim/lua/gitsigns/debounce.lua:76: in function 'update'                                                                                                                                                 
        ...l/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/actions.lua:1294: in function <...l/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/actions.lua:1288>                                                                                     
stack traceback:                                                                                                                                                                                                                             
        [C]: in function 'error'                                                                                                                                                                                                             
        ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:105: in function 'cb'                                                                                                                                                    
        ...cal/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/async.lua:140: in function 'cb'                                                                                                                                                    
        ...l/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/manager.lua:48: in function <...l/share/nvim/lazy/gitsigns.nvim/lua/gitsigns/manager.lua:46>

My hydra config

I can't quite figure out how to reliably trigger this error, can spend more time investigating if this workaround isn't desirable

@lewis6991 lewis6991 merged commit f412f51 into lewis6991:main Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants